<template>
	<div>
		<slot v-if="loading" name="loading">
			<div>加载中...</div>
		</slot>
		<slot v-else-if="!loading && list.length === 0" name="empty">
			<div>暂无数据</div>
		</slot>
		<slot v-else></slot>
	</div>
</template>

<script setup>
defineProps({
	loading: {
		type: Boolean,
		default: true
	},
	list: {
		type: Array,
		default: () => []
	}
})
</script>
<style lang='less' scoped></style>
